class MainController < ApplicationController
    before_filter :login_required
    def index
        if is_student? || is_reviewer?
            # main page for students is the plans index
            redirect_to plans_url
        elsif is_reviewer?
            # main page for reviewers is the pending index
            redirect_to('/pending')
        elsif is_admin?
            # main page for an admin is the users index
            redirect_to users_url
        else
            # new session if not logged in and somehow get here
            redirect_to new_session_url
        end
    end
end
